<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery-1.12.4.min (1).js"></script>
</head>

<body>
    <button id="btn">发起不带参数的get请求</button>
    <script>
        $(function () {
            // $("#btn").on("click",function(){
            //     $.get("http://www.liulongbin.top:3006/api/getbooks",function(res){
            //         console.log(res);
            //     })
            // })

            $("#btn").on("click", function () {
                $.get("http://www.liulongbin.top:3006/api/getbooks", function (res) {
                    console.log(res);
                })
            })
        })
    </script>
</body>

</html>